package tpoo.common.utils.passiveOperations;

import tpoo.common.dto.model.users.UserDTO;
import tpoo.common.utils.UserSession;

public class AfterLoginOperation extends PassiveOperation {

	private static final long serialVersionUID = 1L;

	public AfterLoginOperation(UserDTO loggedUser) {
		this.setLoggedUser(loggedUser);
	}
	
	@Override
	public void execute() throws Exception {
		getLogger().debug("Creando la sesión en el cliente");
		UserSession.create(loggedUser);
	}
	
	public void setLoggedUser(UserDTO loggedUser) {
		this.loggedUser = loggedUser;
	}

	public UserDTO getLoggedUser() {
		return loggedUser;
	}

	private UserDTO loggedUser;
	

}
